#ifndef __RECTANGLE_H__
#define __RECTANGLE_H__

#include <Length.h>

struct Geometry;
typedef Geometry* RectangleState;

struct Rectangle
{
    Rectangle(double length, double width);

    double
    getArea() const;

    double
    getPerimeter() const;

    bool
    isValid() const;

    bool changeLength(double length);

    bool changeWidth(double width);

private:
    void updateValidState();

private:
    Rectangle(const Rectangle&);

    Length length_m;
    Length width_m;

    RectangleState rectangleState_m;
};

#endif

